class TradTypeModel{
  String id;
  String name;
  String path;
  String trade_begin_time;
  String trade_end_time;
  String consult_price;
  String system_price;
  String up_down_base;
  String ratio;
  TradTypeModel({this.id,this.name,this.path,this.trade_begin_time,this.trade_end_time,this.consult_price,
  this.system_price,this.up_down_base,this.ratio});
  TradTypeModel.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
    path = json['path'];
    trade_begin_time = json['trade_begin_time'];
    trade_end_time = json['trade_end_time'];
    consult_price = json['consult_price'];
    system_price = json['system_price'];
    up_down_base = json['up_down_base'];
    ratio = json['ratio'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    data['path'] = this.path;
    data['trade_begin_time'] = this.trade_begin_time;
    data['trade_end_time'] = this.trade_end_time;
    data['consult_price'] = this.consult_price;
    data['system_price'] = this.system_price;
    data['up_down_base'] = this.up_down_base;
    data['ratio'] = this.ratio;
    return data;
  }
}


class TradPubInfo{
  String balance;
  List<String> payment;
  TradPubCoin coin;
  TradPubInfo({this.balance,this.payment,this.coin});
  TradPubInfo.fromJson(Map<String, dynamic> json) {
    balance = json['balance'];
    payment = json['payment'] != null ? json['payment'].cast<String>() : [];
    coin = json['coin'] != null
        ? new TradPubCoin.fromJson(json['coin'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['balance'] = this.balance;
    data['payment'] = this.payment;
    if (this.coin != null) {
      data['coin'] = this.coin.toJson();
    }
    return data;
  }
}
class TradPubCoin{
  String id;
  String name;
  String path;
  String consult_price;
  String max_price;
  String min_price;
  String is_stop;
  String is_stop_trade;
  String commission;
  List<String> transaction_amount;
  String buy_num;
  String sell_num;
  String trade_begin_time;
  String trade_end_time;
  String is_stop_pub;
  String up_down_base;
  TradPubCoin({this.id,this.name,this.path,this.consult_price,this.max_price,this.min_price,this.is_stop,this.is_stop_trade,
  this.commission,this.transaction_amount,this.buy_num,this.sell_num,this.trade_begin_time,this.trade_end_time,this.is_stop_pub,this.up_down_base});
  TradPubCoin.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
    path = json['path'];
    consult_price = json['consult_price'];
    max_price = json['max_price'];
    min_price = json['min_price'];
    is_stop = json['is_stop'];
    is_stop_trade = json['is_stop_trade'];
    commission = json['commission'];
    transaction_amount = json['transaction_amount'].cast<String>();
    buy_num = json['buy_num'];
    sell_num = json['sell_num'];
    trade_begin_time = json['trade_begin_time'];
    trade_end_time = json['trade_end_time'];
    is_stop_pub = json['is_stop_pub'];
    up_down_base = json['up_down_base'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    data['path'] = this.path;
    data['consult_price'] = this.consult_price;
    data['max_price'] = this.max_price;
    data['min_price'] = this.min_price;
    data['is_stop'] = this.is_stop;
    data['is_stop_trade'] = this.is_stop_trade;
    data['commission'] = this.commission;
    data['transaction_amount'] = this.transaction_amount;
    data['buy_num'] = this.buy_num;
    data['sell_num'] = this.sell_num;
    data['trade_begin_time'] = this.trade_begin_time;
    data['trade_end_time'] = this.trade_end_time;
    data['is_stop_pub'] = this.is_stop_pub;
    data['up_down_base'] = this.up_down_base;
    return data;
  }
}


class PaymentInfo{
  String id;
  String content;
  String new_content;
  String payment;
  String status;
  String mobile;
  String real_name;
  PaymentInfo({this.id,this.content,this.new_content,this.payment,this.status,this.mobile,this.real_name});
  PaymentInfo.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    content = json['content'];
    new_content = json['new_content'];
    payment = json['payment'];
    status = json['status'];
    mobile = json['mobile'];
    real_name = json['real_name'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['content'] = this.content;
    data['new_content'] = this.new_content;
    data['payment'] = this.payment;
    data['status'] = this.status;
    data['mobile'] = this.mobile;
    data['real_name'] = this.real_name;
    return data;
  }
}


class TradOrders{
  List<TradOrderItem> buy;
  List<TradOrderItem> sell;
  TradOrders({this.buy,this.sell});
  TradOrders.fromJson(Map<String, dynamic> json) {
    if (json['buy'] != null) {
      buy = [];
      json['buy'].forEach((v) {
        buy.add(TradOrderItem.fromJson(v));
      });
    }
    if (json['sell'] != null) {
      sell = [];
      json['sell'].forEach((v) {
        sell.add(TradOrderItem.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.buy != null) {
      data['buy'] = this.buy.map((v) => v.toJson()).toList();
    }
    if (this.sell != null) {
      data['sell'] = this.sell.map((v) => v.toJson()).toList();
    }
    return data;
  }
}
class TradOrderItem{
  String wid;
  String price;
  String total_quantity;
  TradOrderItem({this.wid,this.price,this.total_quantity});
  TradOrderItem.fromJson(Map<String, dynamic> json) {
    wid = json['wid'];
    price = json['price'];
    total_quantity = json['total_quantity'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['wid'] = this.wid;
    data['price'] = this.price;
    data['total_quantity'] = this.total_quantity;
    return data;
  }
}





class TradOrderExp{
  String id;
  String wid;
  String price;
  String total_quantity;
  String type;
  String payment;
  TradOrderExp({this.id,this.wid,this.price,this.total_quantity,this.type,this.payment});
  TradOrderExp.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    wid = json['wid'];
    price = json['price'];
    total_quantity = json['total_quantity'];
    type = json['type'];
    payment = json['payment'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['wid'] = this.wid;
    data['price'] = this.price;
    data['total_quantity'] = this.total_quantity;
    data['type'] = this.type;
    data['payment'] = this.payment;
    return data;
  }
}


class MyAdOrders{
  String id;
  String wid;
  String type;
  String price;
  String total_price;
  String quantity;
  String commission;
  String commission_type;
  String payment;
  String status;
  String finnshed_time;
  String create_time;
  String wid_name;
  String wid_logo;
  String order_status;
  String pay_status;
  String appeal;
  String uid;
  String order_create_time;
  MyAdOrders({this.id,this.wid,this.type,this.price,this.total_price,this.quantity,this.commission,this.commission_type,
  this.payment,this.status,this.finnshed_time,this.create_time,this.wid_name,this.wid_logo,this.order_status,this.pay_status,this.appeal,
  this.uid,this.order_create_time});
  MyAdOrders.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    wid = json['wid'];
    type = json['type'];
    price = json['price'];
    total_price = json['total_price'];
    quantity = json['quantity'];
    commission = json['commission'];
    commission_type = json['commission_type'];
    payment = json['payment'];
    status = json['status'];
    finnshed_time = json['finnshed_time'];
    create_time = json['create_time'];
    wid_name = json['wid_name'];
    wid_logo = json['wid_logo'];
    order_status = json['order_status'];
    pay_status = json['pay_status'];
    appeal = json['appeal'];
    uid = json['uid'];
    order_create_time = json['order_create_time'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['wid'] = this.wid;
    data['type'] = this.type;
    data['price'] = this.price;
    data['total_price'] = this.total_price;
    data['quantity'] = this.quantity;
    data['commission'] = this.commission;
    data['commission_type'] = this.commission_type;
    data['payment'] = this.payment;
    data['status'] = this.status;
    data['finnshed_time'] = this.finnshed_time;
    data['create_time'] = this.create_time;
    data['wid_name'] = this.wid_name;
    data['wid_logo'] = this.wid_logo;
    data['order_status'] = this.order_status;
    data['pay_status'] = this.pay_status;
    data['appeal'] = this.appeal;
    data['uid'] = this.uid;
    data['order_create_time'] = this.order_create_time;
    return data;
  }
}




class TradOrderDetail{
  String id;
  String sn;
  String wid;
  String type;
  String user_id;
  String uid;
  String buy_name;
  String buy_mobile;
  String buy_white;
  String to_uid;
  String sell_name;
  String sell_mobile;
  String sell_white;
  String quantity;
  String price;
  String total_price;
  String commission;
  String create_time;
  String finnshed_time;
  String status;
  String pay_status;
  String certificate;
  String pay_type;
  String name;
  String coin_logo;
  String appeal;
  String mark;
  String prompt;
  List<OrderDetailPay> payment;
  TradOrderDetail({this.id,this.sn,this.wid,this.type,this.user_id,this.uid,this.buy_name,this.buy_mobile,
  this.buy_white,this.to_uid,this.sell_name,this.sell_mobile,this.sell_white,this.quantity,this.price,
  this.total_price,this.commission,this.create_time,this.finnshed_time,this.status,this.pay_status,this.certificate,
  this.pay_type,this.name,this.coin_logo,this.payment,this.appeal,this.mark,this.prompt});
  TradOrderDetail.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    sn = json['sn'];
    wid = json['wid'];
    type = json['type'];
    user_id = json['user_id'];
    uid = json['uid'];
    buy_name = json['buy_name'];
    buy_mobile = json['buy_mobile'];
    buy_white = json['buy_white'];
    to_uid = json['to_uid'];
    sell_name = json['sell_name'];
    sell_mobile = json['sell_mobile'];
    sell_white = json['sell_white'];
    quantity = json['quantity'];
    price = json['price'];
    total_price = json['total_price'];
    commission = json['commission'];
    create_time = json['create_time'];
    finnshed_time = json['finnshed_time'];
    status = json['status'];
    pay_status = json['pay_status'];
    certificate = json['certificate'];
    pay_type = json['pay_type'];
    name = json['name'];
    coin_logo = json['coin_logo'];
    if (json['payment'] != null) {
      payment = [];
      json['payment'].forEach((v) {
        payment.add(OrderDetailPay.fromJson(v));
      });
    }
    appeal = json['appeal'];
    mark = json['mark'];
    prompt = json['prompt'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['sn'] = this.sn;
    data['wid'] = this.wid;
    data['type'] = this.type;
    data['user_id'] = this.user_id;
    data['uid'] = this.uid;
    data['buy_name'] = this.buy_name;
    data['buy_mobile'] = this.buy_mobile;
    data['buy_white'] = this.buy_white;
    data['to_uid'] = this.to_uid;
    data['sell_name'] = this.sell_name;
    data['sell_mobile'] = this.sell_mobile;
    data['sell_white'] = this.sell_white;
    data['quantity'] = this.quantity;
    data['price'] = this.price;
    data['total_price'] = this.total_price;
    data['commission'] = this.commission;
    data['create_time'] = this.create_time;
    data['finnshed_time'] = this.finnshed_time;
    data['status'] = this.status;
    data['pay_status'] = this.pay_status;
    data['certificate'] = this.certificate;
    data['pay_type'] = this.pay_type;
    data['name'] = this.name;
    data['coin_logo']= this.coin_logo;
    data['appeal'] = this.appeal;
    data['mark'] = this.mark;
    data['prompt'] = this.prompt;
    if (this.payment != null) {
      data['payment'] = this.payment.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class OrderDetailPay{
  String content;
  String payment;
  String new_content;
  OrderDetailPay({this.content,this.payment,this.new_content});
  OrderDetailPay.fromJson(Map<String, dynamic> json) {
    content = json['content'];
    payment = json['payment'];
    new_content = json['new_content'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['content'] = this.content;
    data['payment'] = this.payment;
    data['new_content'] = this.new_content;
    return data;
  }
}


class PayMethodStatus{
  int payment;
  String status;
  PayMethodStatus({this.payment,this.status});
  PayMethodStatus.fromJson(Map<String, dynamic> json) {
    payment = json['payment'];
    status = json['status'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['payment'] = this.payment;
    data['status'] = this.status;
    return data;
  }
}